﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<NewUserViewModel>" %>
<%@ Import Namespace="Stimulus360.Controllers" %>
<%@ Import Namespace="Stimulus360.Models.Data" %>
<%@ Import Namespace="Stimulus360.Resources" %>


<asp:Content ID="registerContent" ContentPlaceHolderID="MainContent" runat="server">
    <div class="mainInner fullViewHdr pt10">
	    <div class="pb10"><h3>New User Registration</h3></div>
	    <div class="errorMessages mb10"><%= Html.ValidationSummary(Stimulus360.ValidationSummary_MandatoryDetails )%></div>
        <% using (Html.BeginForm())
           { %>
       <%=Html.AntiForgeryToken()%>
        <div class="NewUrsLeft floatLeft">
        <div>
        <div class="floatLeft proflPic">
          <img id="imgThumb" src="<%=Url.Action("NewUserImage", "Account")%>" alt="User Image" />
          <div class="proflPictext">
            <a id="lnkChange" href="javascript:void(0);">Change Photo</a>
          </div>
        </div>
        <div class="floatLeft mt10 pl10 pb10">
          <div class="pb5"><strong>First Name</strong></div>
            <div class="pb10">
                <%= Html.TextBox("FirstName", Model.User.FirstName, new { @size = "48", @maxlength = "50", @class="mendetoryfield" })%>
                <%= Html.ValidationMessage("FirstName", "*", new { @class = "requiredfield" })%>
            </div>	
            <div class="pb5"><strong>Last Name</strong></div>
            <div><%= Html.TextBox("LastName", Model.User.LastName, new { @size = "48", @maxlength = "50", @class = "mendetoryfield" })%></div>	
        </div>
        <br clear="all" />
        </div>
        <!-- Upload Div Start --> 
        <div>
            <div id="divUpload" class="proflImgUpload p10" style="display:none;">
                <div class="floatLeft"><strong>Upload Photo</strong></div><div class="note floatLeft pl10">Allowed Formats: (bmp, jpeg, jpg, gif, png) </div>
                    <input type="file" size="40" onchange="checkExtension(this);" id="userFileUpload" name="userFileUpload" />
                <div id="divFileUpload"></div>                               
                <div  class="pt10">
                    <input id="btn-upload" type="button" value="Upload" />&nbsp;&nbsp;
                    <input id="btnCancel" type="button" value="Cancel" />
                </div>               
            </div>
            <br clear="all" />
        </div>
        <!-- Upload Div End -->              
        
        <div class="pt10 pl10 pb5"><strong>About</strong> (Short personal bio)</div>
        <div class="pl10">
         <%=Html.TextArea("Bio", Model.User.Bio, new { @cols = "60", @rows = "5" })%>
        </div>
        <div class="pt10 pl10 pb5"><h2>My Interests</h2></div>
        <div class="pt10 pl10 pb5">
          <%Html.RenderPartial("MyInterest", Model.InvestmentCategories); %>
          <div style="display:none"><%=Html.Hidden("interests")%></div>          
        </div>
        
      </div>	
      <div class="NewUrsRight floatLeft">
        <div class="pt10 pl10 pb5"><strong>Community Alias</strong> (primary user id)</div>
            <div class="pl10"><%= Html.TextBox("UserName", Model.User.UserName, new { @size = "40", @maxlength = "10" })%>
            <%= Html.ValidationMessage("UserName", "*", new { @class = "requiredfield" })%></div>
        <div class="pt10 pl10 pb5"><strong>Email Address</strong> (alternate user id)</div>
            <div class="pl10"><%= Html.TextBox("Email", Model.User.Email, new { @size = "40", @maxlength = "255"})%>
            <%= Html.ValidationMessage("Email", "*", new { @class = "requiredfield" })%>
            </div>	
        <div class="pt10 pl10 pb5"><strong>Password</strong> <span class="note">(Min 6 Characters)</span></div>
            <div class="pl10"><%= Html.Password("Password", Model.User.Password, new { @size = "40", @maxlength = "26" })%>
            <%= Html.ValidationMessage("Password", "*", new { @class = "requiredfield" })%></div>	
        <div class="pt10 pl10 pb5"><strong>Retype Password</strong> <span class="note">(Min 6 Characters)</span></div>
        <div class="pl10"><%= Html.Password("ConfirmPassword", Model.User.ConfirmPassword, new { @size = "40", @maxlength = "26" })%>
            <%= Html.ValidationMessage("ConfirmPassword", "*", new { @class = "requiredfield" })%>
        </div>
        <div class="pl10 pt10">
            <%--<img src="/Content/images/sectionBg01.png" width="210" height="91" alt="Image" style="background-color: #999999" />--%>
            <label for="captcha"><%= Html.CaptchaImage(60,315)%></label>
         </div>
        <div class="pt10 pl10 pb5"><strong>Enter the text displayed above</strong></div>
        <div class="pl10" ><%= Html.TextBox("captcha", "", new { @size = "40", @maxlength = "10" })%>
        <%= Html.ValidationMessage("captcha", "*", new { @class = "requiredfield" })%>
        </div>
     </div>
        <br clear="all" />
        <br />
    <div class="buttons pl10">
    <input name="submit" type="submit" class="btTxt submit" id="saveForm" value="Register" />
    &nbsp;
    <input name="Cancel" type="button" class="btTxt submit" id="cancelForm" value="Cancel" />
    </div>
    
    <%} %>    
    <br />
    <!-- Main Area End -->
    </div>
<div style="display:none">
    <%=Html.Hidden("isFileValid","false") %>
    <%=Html.Hidden("categoryIds", Model.CategoryIds) %>
</div> 
<%=Html.Script("UserRegister")%>
</asp:Content>
